<?php
require_once '../../includefiles.php';
if(!$_SESSION['pregister'])
{
	header("Location: ".SITE_URL."/");
	exit;		
}
require_once '../../model/users.php';
require_once '../../model/membershipplan.php';
require_once '../../model/state.php';
require_once '../../model/city.php';
include_once("../../model/usermembership.php");
include_once("../../model/usermembershipdetail.php");
require_once '../../includes/classes/paypalfunction.php'; // Pay Pal pro Function file 
require_once '../../model/admindetails.php';
include_once '../../model/email.php';
include_once '../../model/paypal.php';

$objPlan = new Model_PLAN();
$objState = new Model_State();
$objCity = new Model_City();
$memberObj	= new Model_Membership();
$memberDetailObj = new Model_MembershipDetail();
$userObj = new Model_Users();
$adminObj = new Model_AdminDetails();
$emailObj = new Model_Email();
$paypalObj = new Model_Paypal();


$getplandetail = $objPlan->getAllPlan();
$smarty->assign("getplandetail", $getplandetail);

$stateArray	 	= $objState->getAllStateWithActiveStatus();
if($_SESSION['pregister']['info']['state_id'])
	for($i=0;$i<count($stateArray);$i++)
	{
		if(in_array($stateArray[$i]['state_id'],$_SESSION['pregister']['info']['state_id']))
			$stateArray[$i]['selected']=1;
		else
			$stateArray[$i]['selected']=0;
		
	}
$smarty->assign('stateArray', $stateArray);



for($i=1;$i<=31;$i++)
{
	$days[] = $i;	
}
$smarty->assign("days", $days);

// code for years
$byearfrom = 1960; 
$smarty->assign("byearfrom", $byearfrom);

$byearTo = date('Y')-18; 
$smarty->assign("byearTo", $byearTo);

$yr_arr = array();
for($i=date('Y');$i<=date('Y')+15;$i++)
{
	$yr_arr[] = $i;
}
$smarty->assign('yr_arr',$yr_arr);

$smarty->assign('detail',$_SESSION['pregister']['info']);

$smarty->display(TEMPLATEDIR . '/modules/register/step3.tpl');
unset($smarty);
?>